/*************************************************
Author: will
Date: 10/18/2012
Description:
Notes: 
*************************************************/

#ifndef __CCmdDropItem_h__
#define __CCmdDropItem_h__

#include "../item/CDropItem.h"
#include "CTAsyncCmd.h"

class CMainCtrl;
class CPlayerBaseInfo;
class CPlayerDetailInfo;
class CPlayerOnlineData;
class CCmdDropItem : public CTLib::CTAsyncCmd
{
public:
    CCmdDropItem()
        :uiGID(0)
    {

    }

    virtual int Do(void* pData);
    virtual int LogicDo(int iRet);
    void HandleLevelUp (CPlayerBaseInfo & stPlayerBaseInfo, CPlayerDetailInfo & stPlayerDetailInfo, CPlayerOnlineData & ,
                    CPlayerDetailInfoEx1& stPlayerDetailInfoEx1, CPlayerSnsDetailInfo & stSnsInfo, short shOldLevel);

    CMainCtrl* pstMainCtrl;

    unsigned int uiGID;
    CDropItem   stDropItem;     //需要掉落的物品
    CDropItem   stLeftItem;     //剩下的没法加到用户身上的物品

private:
    void HandleLevelGift (CPlayerBaseInfo & stPlayerBaseInfo, CPlayerDetailInfo & stPlayerDetailInfo, CPlayerOnlineData& , short shOldLevel);
    void HandleStorageGrid (CPlayerBaseInfo & stPlayerBaseInfo, CPlayerDetailInfo & stPlayerDetailInfo, CPlayerOnlineData& , short shOldLevel);
};


class CCmdDropToExSpace : public CTLib::CTAsyncCmd
{
public:
    CCmdDropToExSpace() : _bHaveCallBack(false)
    {
    }

    virtual int Do(void* pData);
    virtual int LogicDo(int iRet);
    virtual int CallBack(int iRet);

    CMainCtrl* pstMainCtrl;

    unsigned int uiGID;
    CDropItem   stDropItem;     //需要掉落的物品

    bool _bHaveCallBack;
};

#endif // __CCmdDropItem_h__

